#ifndef _ZUCINIFILE_HH_
#define _ZUCINIFILE_HH_

#include "nml_intf/zuc.hh"
#include "inifile.hh"

class ZucIniFile : public IniFile
{
public:
    ZucIniFile(int errMask = 0) : IniFile(errMask) {}

    ErrorCode Find(ZucJointType* result, const char* tag, const char* section = NULL, int num = 1);
    ErrorCode Find(bool* result, const char* tag, const char* section, int num = 1);
    ErrorCode FindLinearUnits(ZucLinearUnits* result, const char* tag, const char* section = NULL, int num = 1);
    ErrorCode FindAngularUnits(ZucAngularUnits* result, const char* tag, const char* section = NULL, int num = 1);

    ErrorCode FindArray(int* arrRes, int arrNum, const char* tag, const char* section = NULL, int num = 1);
    ErrorCode FindArray(double* arrRes, int arrNum, const char* tag, const char* section = NULL, int num = 1);
    ErrorCode FindArray(float* arrRes, int arrNum, const char* tag, const char* section = NULL, int num = 1);

    // From base class.
    ErrorCode Find(int* result, int min, int max, const char* tag, const char* section, int num = 1)
    {
        return (IniFile::Find(result, min, max, tag, section, num));
    }
    ErrorCode Find(int* result, const char* tag, const char* section = NULL, int num = 1) { return (IniFile::Find(result, tag, section, num)); }
    ErrorCode Find(double* result, double min, double max, const char* tag, const char* section, int num = 1)
    {
        return (IniFile::Find(result, min, max, tag, section, num));
    }
    ErrorCode Find(double* result, const char* tag, const char* section = NULL, int num = 1) { return (IniFile::Find(result, tag, section, num)); }
    const char* Find(const char* tag, const char* section = NULL, int num = 1) { return (IniFile::Find(tag, section, num)); }

private:
    static StrIntPair jointTypeMap[];
    static StrIntPair boolMap[];
    static StrDoublePair linearUnitsMap[];
    static StrDoublePair angularUnitsMap[];
};

#endif
